37690180eddb794133a5abe3cd7f46081f80032d,OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java,MapContextMenuFragment,onCreateView,#LayoutInflater#ViewGroup#Bundle#,134
Before Change
});
final ImageButton buttonWaypoint = (ImageButton) view.findViewById(R.id.context_menu_route_button);
buttonWaypoint.setImageDrawable(iconsCache.getIcon(R.drawable.map_action_flag_dark,
light ? R.color.icon_color : R.color.dashboard_subheader_text_dark));
buttonWaypoint.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
After Change
final ImageButton buttonWaypoint = (ImageButton) view.findViewById(R.id.context_menu_route_button);
// Correct use of destination vs. waypoit icon on button:
if (getMyApplication().getTargetPointsHelper().getPointToNavigate() == null) {
buttonWaypoint.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag_dark,
light ? R.color.icon_color : R.color.dashboard_subheader_text_dark));
} else {
buttonWaypoint.setImageDrawable(iconsCache.getIcon(R.drawable.map_action_waypoints,
light ? R.color.icon_color : R.color.dashboard_subheader_text_dark));
}
buttonWaypoint.setOnClickListener(new View.OnClickListener() {
@Override